<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .chart1,
      .chart2 {
        width: 800px;
        height: 400px;
      }
    </style>
  </head>
  <body>
    <div class="chart1"></div>
    <div class="chart2"></div>
    <script src="./echarts.js"></script>
    <script>
      const myChart1 = echarts.init(document.querySelector(".chart1"));
      const myChart2 = echarts.init(document.querySelector(".chart2"));

      const option1 = {
        xAxis: {
          data: [
            "星期一",
            "星期二",
            "星期三",
            "星期四",
            "星期五",
            "星期六",
            "星期日",
          ],
        },
        yAxis: {},
        series: {
          type: "bar",
          data: [100, 120, 80, 160, 140, 180, 90],
        },
      };

      const option2 = {
        xAxis: {
          data: [
            "星期一",
            "星期二",
            "星期三",
            "星期四",
            "星期五",
            "星期六",
            "星期日",
          ],
        },
        yAxis: {},
        series: {
          type: "line",
          data: [100, 120, 80, 160, 140, 180, 90],
        },
      };

      myChart1.setOption(option1);
      myChart2.setOption(option2);
    </script>
  </body>
</html>
